package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_dynamic_reply;

//DAO
public interface U_dynamic_replyMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_DYNAMIC_REPLY  WHERE ID = #{id}")
	public ApiU_dynamic_reply findU_dynamic_replyById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_dynamic_reply")
	public List<ApiU_dynamic_reply> findU_dynamic_replys();

	// //根据条件查看数据集
	// public List<Map<String, Object>> findU_dynamic_replysByMap(HashMap
	// condition);

	// 添加
	@Insert("INSERT INTO U_DYNAMIC_REPLY (DYNAMIC_ID, ADD_TIME, REPLY_CONTENT, USER_ID, USER_NAME, TO_UID, TO_UNAME, IS_DELETE, EXT1, EXT2, EXT3, EXT4, EXT5) VALUES (#{dynamic_id}, #{add_time}, #{reply_content}, #{user_id}, #{user_name}, #{to_uid}, #{to_uname}, #{is_delete}, #{ext1}, #{ext2}, #{ext3}, #{ext4}, #{ext5})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_dynamic_reply(ApiU_dynamic_reply u_dynamic_reply);

	// 修改
	@Update("UPDATE U_DYNAMIC_REPLY SET DYNAMIC_ID = #{dynamic_id}, ADD_TIME = #{add_time}, REPLY_CONTENT = #{reply_content}, USER_ID = #{user_id}, USER_NAME = #{user_name}, TO_UID = #{to_uid}, TO_UNAME = #{to_uname}, IS_DELETE = #{is_delete}, EXT1 = #{ext1}, EXT2 = #{ext2}, EXT3 = #{ext3}, EXT4 = #{ext4}, EXT5 = #{ext5} WHERE ID = #{id}")
	public int updateU_dynamic_reply(ApiU_dynamic_reply u_dynamic_reply);

	// 删除
	@Delete("DELETE FROM U_DYNAMIC_REPLY  WHERE ID = #{id}")
	public int deleteU_dynamic_reply(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
